package work.soho.proxy.aliyun.parts;

import com.aliyuncs.exceptions.ClientException;
import work.soho.proxy.PartsConfigure;

import java.io.IOException;

public interface IPart extends IConfig {
    /**
     * 检查部件是否存在
     * @return
     */
    boolean isExist();

    /**
     * 获取组件唯一识别ID
     *
     * @return
     */
    String getId() throws ClientException;

    /**
     * 删除部件
     */
    void drop();

    /**
     * 创建部件
     */
    void create() throws AliyunPartsException, ClientException, IOException;

    /**
     * 启动部件
     */
    void start() throws AliyunPartsException, ClientException, IOException;

    /**
     * 配置信息回传
     */
    void configure() throws AliyunPartsException, ClientException, IOException;
}
